<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript">
function adddiv(id){
	if(id == 6){
		alert("一次最多只能添加"+id+"条数据");
	}
	document.getElementById("inputdiv"+id).style.display="inline";
	document.getElementById("adiv"+id).style.display="none";
}
<%String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
</script>
<link href="../css/common.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
a {poorfish:expression(this.onclick=function kill(){return false})}
</style>
</head>
<body>
<form action="/bookDeviceSys/user/user!addUserType.action" method="post">
<table align="center" width="30%"  id="mytable">
	<tr>
		<td width="100%">
		新增类型：<input type="text" name="user.userTypes"><div id="adiv1"><a href="javascript:adddiv(1)"><img src="<%=basePath%>/images/add1.jpg" width="30px" height="30px" title="继续添加"></a></div>
		<br/><div style="display: none" id="inputdiv1">新增类型：<input type="text" name="user.userTypes"><div id="adiv2"><a href="javascript:adddiv(2)"><img src="<%=basePath%>/images/add1.jpg" width="30px" height="30px" title="继续添加"></a></div></div>
		<br/><div style="display: none" id="inputdiv2">新增类型：<input type="text" name="user.userTypes"><div id="adiv3"><a href="javascript:adddiv(3)"><img src="<%=basePath%>/images/add1.jpg" width="30px" height="30px" title="继续添加"></a></div></div>
		<br/><div style="display: none" id="inputdiv3">新增类型：<input type="text" name="user.userTypes"><div id="adiv4"><a href="javascript:adddiv(4)"><img src="<%=basePath%>/images/add1.jpg" width="30px" height="30px" title="继续添加"></a></div></div>
		<br/><div style="display: none" id="inputdiv4">新增类型：<input type="text" name="user.userTypes"><div id="adiv5"><a href="javascript:adddiv(5)"><img src="<%=basePath%>/images/add1.jpg" width="30px" height="30px" title="继续添加"></a></div></div>
		<br/><div style="display: none" id="inputdiv5">新增类型：<input type="text" name="user.userTypes"><div id="adiv6"><a href="javascript:adddiv(6)"><img src="<%=basePath%>/images/add1.jpg" width="30px" height="30px" title="继续添加"></a></div></div>
		</td>
		
	</tr>
	<tr><td colspan="2"><input type="submit" value="新增"></tr>
</table>
</form>
</body>
</html>